/**
 * Framework for batch testing user profile models
 * Final project by Sergey Nepomnyachiy and Julia Polchin
 * Supervisor: Tsvi Kuflik
 *
 */
package models.rafi_tati;

import java.util.HashSet;

/**
 * @author Sergey&Julia
 * 
 */
public class Category {
	private double interest;
	private double score;
	private boolean isFuture;

	/**
	 * @param id
	 */
	public Category() {
		this.interest = 0.0;
		this.score = 0.0;
		this.setFuture(false);
	}

	/**
	 * @return
	 */
	public double getInterest() {
		return this.interest;
	}

	/**
	 * @return
	 */
	public double getScore() {
		return this.score;
	}

	/**
	 * 
	 * @param rating 
	 * @param strategy
	 * @return item's score
	 */
	@SuppressWarnings("boxing")
	public double learn(Integer rating, Strategy strategy) {

		if (rating > Constants.ratingThreshold) {
			this.score++;
			this.interest++;
		} else {
			this.score--;
			this.interest--;
		}
		return this.interest;
	}

	/**
	 * @param interest
	 */
	public void setInterest(double interest) {
		this.interest = interest;
	}

	/**
	 * @param score
	 */
	public void setScore(double score) {
		this.score = score;
	}

	/**
	 * @param isFuture the isFuture to set
	 */
	public void setFuture(boolean isFuture) {
		this.isFuture = isFuture;
	}

	/**
	 * @return the isFuture
	 */
	public boolean isFuture() {
		return this.isFuture;
	}

}
